#!/bin/sh
HOST="localhost:2046"
q="%E6%A0%A1%E9%95%BF"

#return `echo -n "$1" | od -An -tx1 | tr ' ' %`

curl -v -g "http://$HOST/status"

#curl -v -g "http://$HOST/search?index=test1&q=${q}&matchmode=SPH_MATCH_ALL&rankingmode=SPH_RANK_PROXIMITY_BM25&sortmode=SPH_SORT_RELEVANCE"

#curl -v -g "http://$HOST/search?index=test1&q=${q}&groupby=SPH_GROUPBY_ATTR:attr_int:@groupby+desc&matchmode=SPH_MATCH_ALL&rankingmode=SPH_RANK_PROXIMITY_BM25&sortmode=SPH_SORT_RELEVANCE"

#curl -v -g "http://$HOST/search?index=test1&q=${q}&idrange=986312,986312&matchmode=SPH_MATCH_ALL&rankingmode=SPH_RANK_PROXIMITY_BM25&sortmode=SPH_SORT_RELEVANCE"

#curl -v -g "http://$HOST/search?index=test1&q=${q}&start=0&rows=10&filter=attr_int:%5B1+TO+2%5D&fieldweights=title:2,content:1&maxquerytime=1000&matchmode=SPH_MATCH_ALL&rankingmode=SPH_RANK_PROXIMITY_BM25&sortmode=SPH_SORT_RELEVANCE"

#curl -v -g "http://$HOST/search?index=test1&q=${q}&start=0&rows=10&filter=attr_int:[1%20TO%202]&fieldweights=title:2,content:1&maxquerytime=1000&matchmode=SPH_MATCH_ALL&rankingmode=SPH_RANK_PROXIMITY_BM25&sortmode=SPH_SORT_RELEVANCE"

#curl -v "http://$HOST/search?index=test1&q=${q}&start=0&rows=10&filter=attr_INT:1,2&fieldweights=title:2,content:1&maxquerytime=1000&matchmode=SPH_MATCH_ALL&rankingmode=SPH_RANK_PROXIMITY_BM25&sortmode=SPH_SORT_RELEVANCE"

#curl -v "http://$HOST/search?index=test1&q=${q}&start=0&rows=10&filter=intAttr:1,2&fieldweights=title:2,content:1&maxquerytime=1000&matchmode=SPH_MATCH_ALL&rankingmode=SPH_RANK_PROXIMITY_BM25&sortmode=SPH_SORT_RELEVANCE"

#curl -v "http://$HOST/search?index=test1&q=${q}&start=0&rows=10&filter=intAttr:1,2&filter=strAttr:a,b&fieldweights=title:2,content:1&maxquerytime=1000&matchmode=SPH_MATCH_ALL&rankingmode=SPH_RANK_PROXIMITY_BM25&sortmode=SPH_SORT_RELEVANCE"

#curl -v "http://$HOST/search?index=test1&q=${q}&start=10&rows=10&filter=attr_int:1,2&fieldweights=title:2,content:1&matchmode=SPH_MATCH_ALL&rankingmode=SPH_RANK_PROXIMITY_BM25&sortmode=SPH_SORT_RELEVANCE"

#%E5%85%AC%E5%BC%80 公开
#%E6%A0%A1%E9%95%BF 校长
#%E9%93%B6%E5%85%83 银元

